<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="vue.js"></script>
	</head>
	<body>
		<div id="app">
		{{msg}}
		{{say()}}
		<hr />
		<button @click="whatColor('green1')">点我有惊喜</button>
		<button @click="whatColor('green2')">点我有惊吓</button>
		</div>
	</body>
	<script>
		new Vue({
			el:"#app",
			data:{
				msg:"hello Vue js"
			},
			methods:{
				say:function(){
					//alert("hi");
					console.log("say methods")
				},
				whatColor:function(color){
					//return color
					alert("vue"+color);
				}
			}
			
		});
	</script>
</html>
